<?php /* Smarty version Smarty-3.1.14, created on 2014-02-22 22:05:23
         compiled from "admin\tpl\user\adduser.htm" */ ?>
<?php /*%%SmartyHeaderCode:278015308aea3ef7982-13348870%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '40a037b7a027d7ba7c64570b97c6bb10cd978f15' => 
    array (
      0 => 'admin\\tpl\\user\\adduser.htm',
      1 => 1392259707,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '278015308aea3ef7982-13348870',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'web_host' => 0,
    'web_app_url' => 0,
    'phone' => 0,
    'email' => 0,
    'realname' => 0,
    'role' => 0,
    'result' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.14',
  'unifunc' => 'content_5308aea408da42_29758264',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5308aea408da42_29758264')) {function content_5308aea408da42_29758264($_smarty_tpl) {?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<LINK href="<?php echo $_smarty_tpl->tpl_vars['web_host']->value;?>
/common/admin/css/admin.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="<?php echo $_smarty_tpl->tpl_vars['web_host']->value;?>
/common/libs/jquery-1.9.1.js"></script>
<script type="text/javascript">
	$(function() {
		$("#form1").submit( function () {
			$("#result").val("");
			
			if( ($("#phone").val() == "") && ($("#email").val() == "") ){
				$("#phone").focus();
				$("#result").text("手机号和邮箱号至少有一个！");
				return false;
			}
			if($("#pw").val() == ""){
				$("#pw").focus();
				$("#result").text("密码不能为空！");
				return false;
			}
			if($("#pw").val() != $("#repw").val()){
				$("#pw").focus();
				$("#result").text("两次密码不一致！");
				return false;
			}
			//alert($("#newssort").val());
			if($("#realname").val() == ""){
				$("#realname").focus();
				$("#result").text("真实姓名不能为空！");
				return false;
			}
			
			
			if($("#role").val()==""){
				$("#role").focus();
				$("#result").text("请选择用户角色！");
				return false;
			}
			return true;
		} );		
	});
	
	$(window).keydown(function(event){
		if(event.ctrlKey && event.which == 13) {
			//alert("aa"); 
			$("#form1").submit();
		}
	});
</script>
</head>

<body>
<TABLE cellSpacing=0 cellPadding=0 width="100%" align=center border=0>
  	<TR height=28><TD background="<?php echo $_smarty_tpl->tpl_vars['web_host']->value;?>
/common/admin/images/title_bg1.jpg">当前位置:添加用户</TD></TR>
  	<TR><TD bgColor=#b1ceef height=1></TD></TR>
  	<TR height=20>
    	<TD background="<?php echo $_smarty_tpl->tpl_vars['web_app_url']->value;?>
/common/admin/images/shadow_bg.jpg"></TD>
	</TR>
</TABLE>
<div id="info" style=" margin-left:10px;">
<form id="form1" target="_self" name="form1" method="post" action="">
  <p>
  	<label>
  		手机号码：<input type="text" name="phone" id="phone" style="width:200px" value="<?php echo (($tmp = @$_smarty_tpl->tpl_vars['phone']->value)===null||$tmp==='' ? '' : $tmp);?>
" />
  	</label>
  </p>
  <br />
  <p>
  	<label>
  		邮箱地址：<input type="text" name="email" id="email" style="width:200px" value="<?php echo (($tmp = @$_smarty_tpl->tpl_vars['email']->value)===null||$tmp==='' ? '' : $tmp);?>
" />*手机号邮箱二选一作为登录账号使用
  	</label>
  </p>
  <br />
   
  <p>
    <label>用户密码：<input type="password" name="pw" id="pw" style="width:150px" />*必填
    </label>
  </p>
  <br />
  <p>
    <label>确认密码：<input type="password" name="repw" id="repw" style="width:150px" />*必填
    </label>
  </p>
    <br />
  <p>
  
  <p>
  <label>真实姓名：<input type="text" name="realname" id="realname" style="width:150px" value="<?php echo (($tmp = @$_smarty_tpl->tpl_vars['realname']->value)===null||$tmp==='' ? '' : $tmp);?>
"  />*必填
  </label>
  </p>
  <br />
    <label>用户角色：<select  name="role" id="role" style="width:150px">
			<option value="" <?php if (!isset($_smarty_tpl->tpl_vars['role']->value)){?> selected="selected" <?php }?> >选择用户角色</option>
			<?php if (isset($_smarty_tpl->tpl_vars['smarty']->value['section']['r'])) unset($_smarty_tpl->tpl_vars['smarty']->value['section']['r']);
$_smarty_tpl->tpl_vars['smarty']->value['section']['r']['name'] = 'r';
$_smarty_tpl->tpl_vars['smarty']->value['section']['r']['loop'] = is_array($_loop=$_smarty_tpl->tpl_vars['role']->value) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$_smarty_tpl->tpl_vars['smarty']->value['section']['r']['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']['r']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['r']['loop'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['r']['step'] = 1;
$_smarty_tpl->tpl_vars['smarty']->value['section']['r']['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['r']['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']['r']['loop']-1;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['r']['show']) {
    $_smarty_tpl->tpl_vars['smarty']->value['section']['r']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['r']['loop'];
    if ($_smarty_tpl->tpl_vars['smarty']->value['section']['r']['total'] == 0)
        $_smarty_tpl->tpl_vars['smarty']->value['section']['r']['show'] = false;
} else
    $_smarty_tpl->tpl_vars['smarty']->value['section']['r']['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['r']['show']):

            for ($_smarty_tpl->tpl_vars['smarty']->value['section']['r']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['r']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['r']['iteration'] = 1;
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['r']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['r']['total'];
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['r']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['r']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['r']['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']['r']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['r']['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['r']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['r']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['r']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['r']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['r']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['r']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['r']['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']['r']['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']['r']['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']['r']['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']['r']['total']);
?>			 
	    	<option value="<?php echo $_smarty_tpl->tpl_vars['role']->value[$_smarty_tpl->getVariable('smarty')->value['section']['r']['index']]['role_id'];?>
" <?php if ($_smarty_tpl->tpl_vars['role']->value==$_smarty_tpl->tpl_vars['role']->value[$_smarty_tpl->getVariable('smarty')->value['section']['r']['index']]['role_id']){?> selected="selected"<?php }?>  ><?php echo $_smarty_tpl->tpl_vars['role']->value[$_smarty_tpl->getVariable('smarty')->value['section']['r']['index']]['role_name'];?>
</option>
	  		<?php endfor; endif; ?>
		</select>*必填
    </label>
  </p>
    <br />
     <p>
    <label>
    <input type="submit" name="Submit" value="提交" />
	<font id="result" color="#CC0000"><?php echo (($tmp = @$_smarty_tpl->tpl_vars['result']->value)===null||$tmp==='' ? '' : $tmp);?>
</font>
    </label>
  </p>
  <br />
  
</form>
</div>
</body>
</html>
<?php }} ?>